define(function(require, exports, module)
{
    var Widget = require("widget");
    var $ = require("$");
    var template = require("./menu.tpl");
    require("bootstrap.css");
    require("bootstrap-responsive.css");
    require("light-theme.css");
    require("dark-theme.css");
    require("dark-blue-theme.css");
    require("theme-colors.css");
    var Menu = Widget.extend(
    {
        template : template,
        loadData : function()
        {
            var that = this;
            var url = this.get("url");
            var data = this.get("data");
            $.ajax(
            {
                url : url,
                dataType : "json",
                data : data,
                type : "POST",
                async : false,
                success : function(data)
                {
                    //console.log(data);
                    that.setModel(data.list);
                }
            });
        }
    });
    module.exports = Menu;
}); 